﻿{extend name="common/base" /}
{block name="title"}菜单管理 - 管理员管理{/block}


{block name="content"}
<div class="Hui-admin-article">
    <nav class="breadcrumb" style="background-color:#fff;padding: 0 24px">
        首页
        <span class="c-gray en">/</span>
        管理员管理
        <span class="c-gray en">/</span>
        菜单管理
    </nav>

    <article class="Hui-admin-content clearfix">
        <div class="panel">
            <div class="panel-body">
                <div class="text-c">
                    <form class="Huiform" method="get" action="" target="_self">
                        <input type="text" class="input-text" value="{$search.title}" style="width:250px" placeholder="菜单名称" id="" name="title">
                        <button type="submit" class="btn btn-success" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜菜单</button>
                    </form>
                </div>
            </div>
        </div>
        <div class="panel mt-20">
            <div class="panel-body">
                <div class="clearfix">
                    <span class="f-l">
                        <!--<a href="javascript:;" onclick="datadel()" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>-->
                        <a href="javascript:;" onclick="menu_add('添加菜单')" class="btn btn-primary radius"><i class="Hui-iconfont">&#xe600;</i> 添加菜单</a>
                    </span>
                    <span class="f-r">共有数据：<strong>{$count}</strong> 条</span>
                </div>
                <div class="mt-20 clearfix">
                    <table class="table table-border table-bordered table-bg table-hover table-sort">
                        <thead>
                            <tr>
                                <th scope="col" colspan="8">菜单节点</th>
                            </tr>
                            <tr class="text-c">
                                <th width="25"><input type="checkbox" name="" value=""></th>
                                <th width="40">ID</th>
                                <th width="200">菜单名称</th>
                                <th>路由</th>
                                <th>等级</th>
                                <th>路径</th>
                                <th>图标</th>
                                <th width="100">操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            {foreach $list as $k=>$v}
                            <tr class="text-c">
                                <td><input type="checkbox" value="{$v.id}" name="id"></td>
                                <td>{$k+1}</td>
                                <td>{for start="1" end="$v.level"}&nbsp;&nbsp;&nbsp;&nbsp;{/for}{$v.menu_name}</td>
                                <td>{if !empty($v.action)}{$v.controller}/{$v.action}{/if}</td>
                                <td>{$v.level}</td>
                                <td>{$v.path}</td>
                                <td><i class="Hui-iconfont" >&{$v.icon};</i></td>
                                <td>
                                    <a title="编辑" href="javascript:;" onclick="menu_edit('菜单编辑',{$v.id},'900','600')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a> 
                                    <a title="删除" href="javascript:;" onclick="menu_del(this,{$v.id})" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a>
                                </td>
                            </tr>
                            {/foreach}
                        </tbody>
                    </table>
                    {$page|raw}
                </div>
            </div>
        </div>
    </article>
    
</div>
<input name="add" type="hidden" value="{:url('menu/add')}">
<input name="edit" type="hidden" value="{:url('menu/edit')}">
<input name="del" type="hidden" value="{:url('menu/del')}">

{/block}

{block name="js"}
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="__LIB__/datatables/1.10.15/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="__LIB__/laypage/1.2/laypage.js"></script>
<script type="text/javascript" src="__JS__/main.js"></script>
<!--/请在上方写此页面业务相关的脚本-->
{/block}

